using System;
using System.Reflection;
using FluentNHibernate;
using FluentNHibernate.Conventions;

namespace Caramel.FluentNHibernate.Conventions
{
	public class ForeignKeyNamingConvention : ForeignKeyConvention
	{
		protected override string GetKeyName(Member property, Type type)
		{
			if (property == null)
			{
				return type.Name + "ID";
			}

			return property.Name + "ID";
		}
	}
}
